# -*- coding: UTF-8 -*- #
"""
-------真正的勇士， 敢于直面惨淡的Warning、 敢于正视淋漓的Error-----
@author : 贾鹏博
@file : add_member_page.py
@time : 2022/6/15 22:19
"""

from apptest.QiYeWeiXin_PO.base.base_page import BagePage
from apptest.QiYeWeiXin_PO.page.edit_member_page import EditMemberPage
from appium.webdriver.common.appiumby import AppiumBy


class AddMemberPage(BagePage):

    def click_addmemeber_menual(self):
        # 点击手动添加
        self.find_and_click(AppiumBy.XPATH, "//*[@text='手动输入添加']")
        return EditMemberPage(self.driver)

    def get_text(self):
        # 抓取 Toast   界面会冒泡 ： 添加成功
        result = self.get_toast_text()
        return result
